import service from "../../server/request";

export function getCommodity(data:any) {
  return service({
    url: "/commodity/all",
    method: "get",
    params: data,
  });
}

export function getCommodityByShopId(data:any) {
  return service({
    url: "/commodity/shopId",
    method: "get",
    params: data,
  });
}
export function createCommodityByShopIdAndJwt(data:any) {
  return service({
    url: "/commodity/jwt/shopId",
    method: "post",
    params: data,
  });
}

export function deleteCommodityByIdAndJwt(data:any) {
  return service({
    url: "/commodity/jwt/id",
    method: "get",
    params: data,
  });
}
export function updateCommodityByIdAndJwt(data:any) {
  return service({
    url: "/commodity/jwt/id",
    method: "put",
    params: data,
  });
}
export function getCommodityById(data:any) {
  return service({
    url: "/commodity/id",
    method: "get",
    params: data,
  });
}
export function changeCommodityEnableByIdAndJwt(data:any) {
  return service({
    url: "/commodity/jwt/id/enable",
    method: "get",
    params: data,
  });
}

export function getCommodityByOrderId(data:any) {
  return service({
    url: "/commodity/jwt/orderId",
    method: "get",
    params: data,
  });
}



